[mirrors]
http://heanet.dl.sourceforge.net/project/tdb/tdb/1.0.6/tdb-1.0.6.tar.gz
http://surfnet.dl.sourceforge.net/project/tdb/tdb/1.0.6/tdb-1.0.6.tar.gz
http://switch.dl.sourceforge.net/project/tdb/tdb/1.0.6/tdb-1.0.6.tar.gz

[vars]
filesize=139948
sha512=8b293bca847a49da416f0b84056846f63703ae96a34cc890673befcc015424bba0781e8d4059868182c24b191e5038314f2e4c66cb1b5f6c28eead1fa5e4ecaf

[deps]
gdbm

[build]
patch -p1 < "$K"/tdb-help.patch

# this package is 12 years old and doesnt recognise x86_64
# there is a recent fork of fedora / redhat, but it is 4 times as big
# and of course uses some glibc specific crap (strtouq)
cp -f "$K"/config.sub .

[ -n "$CROSS_COMPILE" ] && xconfflags="--host=$($CC -dumpmachine)"
CFLAGS="$optcflags" LDFLAGS="$optldflags" \
CPPFLAGS=-D_GNU_SOURCE \
  ./configure --prefix="$butch_prefix" $xconfflags
make -j$MAKE_THREADS
make DESTDIR="$butch_install_dir" install
